package com.yxt.shecaiyun.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yxt.shecaiyun.entity.Club;
import com.yxt.shecaiyun.service.ClubService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/club")
public class ClubController extends BaseController<ClubService, Club> {

    @Autowired
    private ClubService clubService;

    @GetMapping("/find-all")
    public List<Club> findAllClub() {
        List<Club> clubs = clubService.findAllClub();

//        clubs.forEach(System.out::println);
        return clubs;

    }


}